package cn.iocoder.yudao.module.trade.dal.mysql.deliverypickupstoreimage;


import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.trade.dal.dataobject.deliverypickupstoreimage.DeliveryPickUpStoreImageDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.trade.controller.admin.deliverypickupstoreimage.vo.*;

/**
 * 门店证件图片 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface DeliveryPickUpStoreImageMapper extends BaseMapperX<DeliveryPickUpStoreImageDO> {

    default PageResult<DeliveryPickUpStoreImageDO> selectPage(DeliveryPickUpStoreImagePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<DeliveryPickUpStoreImageDO>()
                .eqIfPresent(DeliveryPickUpStoreImageDO::getStoreId, reqVO.getStoreId())
                .eqIfPresent(DeliveryPickUpStoreImageDO::getDocumentType, reqVO.getDocumentType())
                .eqIfPresent(DeliveryPickUpStoreImageDO::getDocumentCode, reqVO.getDocumentCode())
                .betweenIfPresent(DeliveryPickUpStoreImageDO::getStartTime, reqVO.getStartTime())
                .betweenIfPresent(DeliveryPickUpStoreImageDO::getEndTime, reqVO.getEndTime())
                .eqIfPresent(DeliveryPickUpStoreImageDO::getImagesLink, reqVO.getImagesLink())
                .betweenIfPresent(DeliveryPickUpStoreImageDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(DeliveryPickUpStoreImageDO::getId));
    }

}